<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" th:fragment="footer">
<head>
    <meta charset="utf-8">
    <title>登录</title>
    <link rel="stylesheet" href="./css/bootstrap.min.css" >
</head>
<body>
<div id="app">
    <m-center-box>
        <m-center>
            <h1>登录</h1>
        </m-center>
        <form>
            <m-input :labelwidth="90" v-model="username" label="用户名"></m-input>
            <m-input :labelwidth="90" type="password" v-model="password" label="密 码"></m-input>
            <m-center>
                <button type="button" class="btn btn-primary" @click="login">登录</button>
                <button type="button" class="btn btn-default" @click="register">注册</button>
            </m-center>
        </form>
    </m-center-box>
</div>

</body>
<script type="text/javascript" src="./script/vue.js"></script>
<script type="text/javascript" src="./script/components/form.js"></script>
<script>
    var app = new Vue({
        el:'#app',
        data:{
            username:'',
            password:''
        },
        methods:{
            login:function(){
                console.log("login")
                console.log(this.username)
                console.log(this.password)
                // window.location.href='./home.html'
            },
            register:function(){
                console.log("register")
                window.location.href='./register.html'
            }
        }
    })
</script>
</html>